package com.itshare.video.util.mapping;

import com.itshare.video.pojo.bo.AdvertisementDTO;
import com.itshare.video.pojo.bo.AdvertisementTimeChangeBO;
import com.itshare.video.pojo.po.Advertisement;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

/**
 * @Author lyr
 * @create 2020/11/4 10:08
 */
@Mapper
public interface AdvertisementDTOMapping {

    @Mappings({
            @Mapping(source = "advertisementPutting",target = "advertisementPutting"),
            @Mapping(source = "contactPersonName",target = "contactPersonName"),
            @Mapping(source = "phone",target = "phone"),
            @Mapping(source = "companyName",target = "companyName"),
            @Mapping(source = "banner",target = "banner"),
            @Mapping(source = "beginTime",target = "beginTime"),
            @Mapping(source = "endTime",target = "endTime"),

    })

    Advertisement from(AdvertisementDTO advertisementDTO);

    @Mappings({
            @Mapping(source = "advertisementId",target = "advertisementId"),
            @Mapping(source = "advertisementPutting",target = "advertisementPutting"),
            @Mapping(source = "beginTime",target = "beginTime"),
            @Mapping(source = "endTime",target = "endTime")

    })
    Advertisement from(AdvertisementTimeChangeBO advertisementTimeChangeBO);


}
